]> dgit.raspbian.org Git - pyside6.git/commitdiff
Add versioned dependencies to python3-dev
authorStuart Prescott <stuart@debian.org>
Sun, 19 Jul 2026 02:42:56 +0000 (12:42 +1000)
committerStuart Prescott <stuart@debian.org>
Mon, 20 Jul 2026 02:04:37 +0000 (12:04 +1000)
Closes: #1141467
debian/control
debian/rules

index e17aac02707b950b60b6379bcc7fee2364c3cb75..455d48c028f8e562e61a54234efb8b0d58300c27 100644 (file)
@@ -138,9 +138,9 @@ Section: libdevel
 Architecture: any
 Depends:
  libshiboken6-py3-6.10 (= ${binary:Version}),
- python3-dev,
  shiboken6 (= ${source:Version}),
  ${misc:Depends},
+ ${pyside6:python3-default-dev},
  ${shlibs:Depends},
 Description: CPython bindings generator for C++ libraries (development files)
  Shiboken6 is a bindings generator for C++ libraries that outputs CPython
@@ -192,6 +192,7 @@ Section: devel
 Depends:
  python3-pyside6.qtcore,
  ${misc:Depends},
+ ${pyside6:python3-default-dev},
  ${python3:Depends},
  ${shlibs:Depends},
 Description: development tools for PySide6 (lupdate)
index 02c49b57019b554d120afe9cd6088d03d81a0f97..3643695291e83c55a07828f6a187d9cb2265b443 100755 (executable)
@@ -30,6 +30,10 @@ PYBUILD_BUILD_ARGS = --skip-packaging --verbose-build
 PYBUILD_BUILD_ARGS += --parallel=$(or $(DEB_BUILD_OPTION_PARALLEL),$(DEB_BUILD_OPTION_PARALLEL),1)
 PYBUILD_INSTALL_ARGS = --reuse-build --verbose-build
 
+# default Python interpreter (and the next version) for dependencies
+PYVER := $(shell py3versions -d -v)
+NEXTPYVER := $(shell echo $(PYVER) | awk 'BEGIN{FS="." }{print $$1 "." $$2 + 1}')
+
 ## Package compilation options
 
 # 1. if sccache is installed then use it
@@ -136,3 +140,12 @@ else
                --test-args '{interpreter} testrunner.py test --buildno=-1'
 endif
 endif
+
+
+execute_before_dh_gencontrol:
+       # Generate a versioned dependency on python3-dev that matches the
+       # current default Python interpreter only. These -dev packages rely
+       # on `python3` as a command and point at the versioned paths to the
+       # headers for that specific version
+       echo "pyside6:python3-default-dev=python3-dev (>= $(PYVER)), python3-dev (<< $(NEXTPYVER)~)" >> debian/libshiboken6-dev.substvars
+       echo "pyside6:python3-default-dev=python3-dev (>= $(PYVER)), python3-dev (<< $(NEXTPYVER)~)" >> debian/pyside6-tools.substvars